package com.shopnight.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;
import lombok.Data;

/**
 * 
 * @TableName rider
 */
@TableName(value ="rider")
@Data
public class Rider implements Serializable {
    /**
     * 主键
     */
    @TableId(type = IdType.AUTO)
    private Integer id;

    /**
     * 用户id
     */
    private Integer userId;

    /**
     * 姓名
     */
    private String name;

    /**
     * 状态0->禁用 1->正常
     */
    private Integer state;

    /**
     * 0->不接收 1->接收邮件
     */
    private Integer receiveEmail;

    /**
     * 余额
     */
    private BigDecimal remainingMoney;

    /**
     * 学号
     */
    private String studentNumber;

    /**
     * 接单数量
     */
    private Integer totalTakeinOrder;

    /**
     * 总盈利
     */
    private BigDecimal totalProfit;

    /**
     * 得到的百分比份额
     */
    private BigDecimal getProportion;

    /**
     * 组织id
     */
    private Integer orgId;

    /**
     * 创建时间
     */
    private Date createTime;

    @TableField(exist = false)
    private static final long serialVersionUID = 1L;

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        Rider other = (Rider) that;
        return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId()))
            && (this.getUserId() == null ? other.getUserId() == null : this.getUserId().equals(other.getUserId()))
            && (this.getName() == null ? other.getName() == null : this.getName().equals(other.getName()))
            && (this.getState() == null ? other.getState() == null : this.getState().equals(other.getState()))
            && (this.getReceiveEmail() == null ? other.getReceiveEmail() == null : this.getReceiveEmail().equals(other.getReceiveEmail()))
            && (this.getRemainingMoney() == null ? other.getRemainingMoney() == null : this.getRemainingMoney().equals(other.getRemainingMoney()))
            && (this.getStudentNumber() == null ? other.getStudentNumber() == null : this.getStudentNumber().equals(other.getStudentNumber()))
            && (this.getTotalTakeinOrder() == null ? other.getTotalTakeinOrder() == null : this.getTotalTakeinOrder().equals(other.getTotalTakeinOrder()))
            && (this.getTotalProfit() == null ? other.getTotalProfit() == null : this.getTotalProfit().equals(other.getTotalProfit()))
            && (this.getGetProportion() == null ? other.getGetProportion() == null : this.getGetProportion().equals(other.getGetProportion()))
            && (this.getOrgId() == null ? other.getOrgId() == null : this.getOrgId().equals(other.getOrgId()))
            && (this.getCreateTime() == null ? other.getCreateTime() == null : this.getCreateTime().equals(other.getCreateTime()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getId() == null) ? 0 : getId().hashCode());
        result = prime * result + ((getUserId() == null) ? 0 : getUserId().hashCode());
        result = prime * result + ((getName() == null) ? 0 : getName().hashCode());
        result = prime * result + ((getState() == null) ? 0 : getState().hashCode());
        result = prime * result + ((getReceiveEmail() == null) ? 0 : getReceiveEmail().hashCode());
        result = prime * result + ((getRemainingMoney() == null) ? 0 : getRemainingMoney().hashCode());
        result = prime * result + ((getStudentNumber() == null) ? 0 : getStudentNumber().hashCode());
        result = prime * result + ((getTotalTakeinOrder() == null) ? 0 : getTotalTakeinOrder().hashCode());
        result = prime * result + ((getTotalProfit() == null) ? 0 : getTotalProfit().hashCode());
        result = prime * result + ((getGetProportion() == null) ? 0 : getGetProportion().hashCode());
        result = prime * result + ((getOrgId() == null) ? 0 : getOrgId().hashCode());
        result = prime * result + ((getCreateTime() == null) ? 0 : getCreateTime().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", id=").append(id);
        sb.append(", userId=").append(userId);
        sb.append(", name=").append(name);
        sb.append(", state=").append(state);
        sb.append(", receiveEmail=").append(receiveEmail);
        sb.append(", remainingMoney=").append(remainingMoney);
        sb.append(", studentNumber=").append(studentNumber);
        sb.append(", totalTakeinOrder=").append(totalTakeinOrder);
        sb.append(", totalProfit=").append(totalProfit);
        sb.append(", getProportion=").append(getProportion);
        sb.append(", orgId=").append(orgId);
        sb.append(", createTime=").append(createTime);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}